<?php 
	$departmentNumber = trim($_GET['departmentNumber']);
	$subjectNumber = trim($_GET['subjectNumber']);
	$subjectName = trim($_GET['subjectName']);
	@$db = new mysqli('localhost','root','','fiuba');

	header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
	header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
	header ("Cache-Control: no-cache, must-revalidate");  // HTTP/1.1
	header ("Pragma: no-cache");
	//header ("Content-type: application/xml"); //uncomment this// if you plan to send XML

	//...................
	echo "you should see now random numbers in your browser:".rand();
	
	if (mysqli_connect_errno())
	{
		echo 'pucha error!';
		exit;
	}
	
	$query = "insert into fiuba.subject values
				(NULL,'$departmentNumber','$subjectNumber','$subjectName')";
	
	$db->query($query);		
	$db->close();
		
?>

 



